package net.llz.mapper;

import net.llz.model.UserDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Let_fan
 * @since 2022-10-08
 */
public interface UserMapper extends BaseMapper<UserDO> {

    @Select("select * from user where username = #{username}")
    UserDO findByUsername(@Param("username") String username);


    @Select("select * from user where id=#{userId}")
    UserDO findById(@Param("userId") Integer id);

    @Select("select * from user where username = #{username} and password = #{pwd}")
    UserDO findByUsernameAndPwd(@Param("username")String username, @Param("pwd")String pwd);

}
